/*************************************************************************
	> File Name: zombie.c
	> Author: Angel Criss
	> Blog: blog.abbycin.tk 
	> Created Time: Tue 08 Jul 2014 09:55:07 AM CST
 ************************************************************************/

#include"head.h"
main()
{
    pid_t child;
    pid_t father;
    father=getpid();

    printf("\e[36m(father) PID: %d\e[0m\n",father);

    switch(child=fork())
    {
        case -1:
            err("fork");
        case 0:
            printf("(child exiting) PID: %d\n",getpid());
            exit(0);
        default:
            sleep(3);
            kill(father,19);
    }
}
